<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>flex商品列表练习</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #f5f5f5;
        }

        .header{
            margin: 20px;
        }

        .container {
            margin: 0 auto;
            width: 1000px;
            height: 40px;
            box-shadow: 0 2px 5px #aaa;
            display: flex;
            padding: 0 5px;
            justify-content: space-between;
            align-items: center;
            background-image: linear-gradient(#f5f4f5,#e6e6e5);
        }

        .left,.right {
            background-color: #ffaf0f;
            border-radius: 5px;
            height: 30px;
            padding:  0 10px;
            border: 0;
            color: #fff;
        }
        
        .right{
            background-color: #bbb;
        }

        .center {
            width: 1000px;
            margin: 0 auto;
        }

        ul {
            height: 620px;
            background-color: #fff;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-evenly;
            align-content: space-evenly;
            list-style: none;
        }

        .name {
            font-size: 12px;
        }
        .item{
            width: 230px;
            height: 280px;
            border: 1px solid #999;
            flex-shrink: 0;
        }
        img {
            display: block;
            width: 100%;
        }
        p {
            white-space: nowrap; /*禁止换行*/
            overflow: hidden; /*超出隐藏*/
            text-overflow: ellipsis; /*文本溢出替换为省略号*/
            font-size: 12px;
            margin: 5px 0;
        }
    </style>
</head>
<body>
<div class="header">
    <div class="container">
        <div class="left">管理收藏夹</div>
        <div class="right">清空失效商品</div>
    </div>
</div>
<div class="main">
    <div class="center">
        <ul>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop1.jpg" alt="">
                    <p class="name">戴尔（DELL）MS116 鼠标有线 商务办公经典对称 有线鼠标</p>
                    <h4 class="price">￥ 19.90</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop2.jpg" alt="">
                    <p class="name">华为笔记本电脑MateBook D 14 SE版 14英寸 11代酷睿 i5</p>
                    <h4 class="price">￥ 3899.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop3.jpg" alt="">
                    <p class="name">雷柏（Rapoo） V500PRO 机械键盘 有线键盘 游戏键盘 104键混光键盘</p>
                    <h4 class="price">￥ 109.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop4.jpg" alt="">
                    <p class="name">先马（SAMA）平头哥M1电竞版 Mini小机箱 支持MATX主板240水冷</p>
                    <h4 class="price">￥ 179.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop5.jpg" alt="">
                    <p class="name">英特尔i5 10400F/10600KF i511400F</p>
                    <h4 class="price">￥ 1299.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop6.jpg" alt="">
                    <p class="name">金士顿（Kingston）32GB USB3.2 Gen 1 U盘 DTX</p>
                    <h4 class="price">￥119.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop7.jpg" alt="">
                    <p class="name">罗技（Logitech）C270高清网络摄像头 网课 摄像头家用 视频通话
                        带麦克风台式机电脑摄像头</p>
                    <h4 class="price">￥119.00</h4>
                </div>
            </li>
            <li>
                <div class="item">
                    <img src="img/shoplist/shop8.jpg" alt="">
                    <p class="name">微软 Xbox Elite 无线控制器2代 二代精英手柄 无线手柄 蓝牙手柄 自定义设置/按键 Type
                        C接口</p>
                    <h4 class="price">￥ 1398.00</h4>
                </div>
            </li>
        </ul>
    </div>
</div>
</body>
</html>